<template>
  <div id="cnmmm"></div>
  <section class="server-stats" id="stats">
    <div class="container">
      <h2>Live Server <span>Metrics</span></h2>
      <div class="stats-grid">
        <div class="stat-card" v-for="stat in stats" :key="stat.title">
          <div class="stat-value">{{ stat.value }}</div>
          <div class="stat-title">{{ stat.title }}</div>
          <div class="stat-bar" :style="{ width: stat.percentage + '%' }"></div>
        </div>
      </div>
    </div>
  </section>
</template>

<script setup>
const stats = [
  { title: 'Online Players', value: '327', percentage: 75 },
  { title: 'Server Uptime', value: '99.9%', percentage: 99 },
  { title: 'New Today', value: '42', percentage: 25 }
]
</script>

<style scoped>
.server-stats {
  padding: 5rem 0;
  background: linear-gradient(to bottom, #0a0a1a, #0a0a0a);
  position: relative;
  overflow: hidden;
}

.server-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
      radial-gradient(circle at 70% 30%, rgba(68, 170, 255, 0.05) 0%, transparent 50%);
}

h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

h2 span {
  background: linear-gradient(90deg, #44aaff, #8844ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.stat-card {
  background: rgba(20, 20, 30, 0.7);
  border: 1px solid rgba(68, 170, 255, 0.2);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
      45deg,
      transparent 48%,
      rgba(68, 170, 255, 0.1) 49%,
      rgba(68, 170, 255, 0.1) 51%,
      transparent 52%
  );
  background-size: 5px 5px;
  opacity: 0.3;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(90deg, #44aaff, #8844ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.stat-title {
  color: #aaa;
  margin-bottom: 1.5rem;
}

.stat-bar {
  height: 4px;
  background: linear-gradient(90deg, #44aaff, #8844ff);
  border-radius: 2px;
  transition: width 1s ease;
}
</style>